package Pantallas;

import net.rim.device.api.ui.Color;
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.component.SeparatorField;
import net.rim.device.api.ui.container.GridFieldManager;
import net.rim.device.api.ui.decor.BackgroundFactory;
/**
 * A class extending the MainScreen class, which provides default standard
 * behavior for BlackBerry GUI applications.
 */
public final class PantallaStatus extends Pantalla
{
    /**
     * Creates a new MyScreen object
     */
	
    public PantallaStatus()
    {        
    	super();
    	try{
    	GridFieldManager hfm1 = new GridFieldManager(4,2,Field.USE_ALL_WIDTH );
    	//hfm1.setColumnPadding(20);
    	
        LabelField nombre = new LabelField("",Field.USE_ALL_WIDTH | Field.FIELD_LEFT);
        LabelField rif = new LabelField("",Field.USE_ALL_WIDTH | Field.FIELD_LEFT);
        LabelField ciudad = new LabelField("",Field.USE_ALL_WIDTH | Field.FIELD_LEFT);
        LabelField zcoru = new LabelField("",Field.USE_ALL_WIDTH | Field.FIELD_LEFT);
        
        LabelField nombre1 = new LabelField("",Field.USE_ALL_WIDTH | Field.FIELD_LEFT);
        LabelField rif1 = new LabelField("",Field.USE_ALL_WIDTH | Field.FIELD_LEFT);
        LabelField ciudad1 = new LabelField("",Field.USE_ALL_WIDTH | Field.FIELD_LEFT);
        LabelField zcoru1 = new LabelField("",Field.USE_ALL_WIDTH | Field.FIELD_LEFT);
        
        nombre.setText("Cliente: ");
        rif.setText("RIF: ");
        ciudad.setText("Ciudad: ");
        zcoru.setText("Ref: ");
         
        nombre1.setText("Pedro Perez C.A");
        rif1.setText("J308226440");
        ciudad1.setText("La Guaira");
        zcoru1.setText("X0604");
        
        hfm1.add(nombre);
        hfm1.add(nombre1);
        hfm1.add(rif);
        hfm1.add(rif1);
        
        hfm1.add(ciudad);
        hfm1.add(ciudad1);
        hfm1.add(zcoru);
        hfm1.add(zcoru1);
        vfm.add(hfm1);
        vfm.add(new SeparatorField());
        
        GridFieldManager gfm = new GridFieldManager(9,3, GridFieldManager.USE_ALL_WIDTH);
        //gfm.setColumnPadding(35);3
        gfm.setColumnProperty(0, GridFieldManager.AUTO_SIZE, 0);
        gfm.setColumnProperty(1, GridFieldManager.AUTO_SIZE, 0);
        
        LabelField xs = new LabelField("Periodo", Field.FIELD_HCENTER);
        xs.setBackground(BackgroundFactory.createSolidBackground(Color.GRAY));
        gfm.add(xs);
        gfm.add(new LabelField("Cantidad", Field.FIELD_HCENTER));
        gfm.add(new LabelField("Total", Field.FIELD_HCENTER));
        
        gfm.add(new LabelField("0-15 dias", Field.FIELD_LEFT));
        gfm.add(new LabelField("1", Field.FIELD_RIGHT));
        gfm.add(new LabelField("2,315.26", Field.FIELD_RIGHT));
        
        gfm.add(new LabelField("16-30 dias", Field.FIELD_LEFT));
        gfm.add(new LabelField("4", Field.FIELD_RIGHT));
        gfm.add(new LabelField("11,982.73",Field.FIELD_RIGHT));
        
        gfm.add(new LabelField("31-45 dias", Field.FIELD_LEFT));
        gfm.add(new LabelField("10", Field.FIELD_RIGHT));
        gfm.add(new LabelField("31,656.65", Field.FIELD_RIGHT));
        
        gfm.add(new LabelField("46-60 dias", Field.FIELD_LEFT));
        gfm.add(new LabelField("0", Field.FIELD_RIGHT));
        gfm.add(new LabelField("0.00", Field.FIELD_RIGHT));
        
        gfm.add(new LabelField("61-90 dias", Field.FIELD_LEFT));
        gfm.add(new LabelField("1", Field.FIELD_RIGHT));
        gfm.add(new LabelField("712.47",Field.FIELD_RIGHT));
        
        gfm.add(new LabelField("91-120 dias", Field.FIELD_LEFT));
        gfm.add(new LabelField("0", Field.FIELD_RIGHT));
        gfm.add(new LabelField("0.00", Field.FIELD_RIGHT));
        
        gfm.add(new LabelField("+120 dias", Field.FIELD_LEFT));
        gfm.add(new LabelField("0", Field.FIELD_RIGHT));
        gfm.add(new LabelField("0.00",Field.FIELD_RIGHT));
        
        gfm.add(new LabelField("Cheques", Field.FIELD_LEFT));
        gfm.add(new LabelField("0", Field.FIELD_RIGHT));
        gfm.add(new LabelField("0.00", Field.FIELD_RIGHT));
        
        vfm.add(gfm);
        add(vfm);
    }catch(Exception e){
    	Dialog.alert(e.getMessage());
    }
    
    }
}
